package com.boarsoft.boar.batch.biz;

import com.boarsoft.boar.batch.entity.BatchLock;

public interface BatchLockBiz {
	/**
	 * 根据主键code获取批量锁
	 * 
	 * @param addr
	 * @return
	 */
	BatchLock get(String code);
	/**
	 * 
	 * @param o
	 */
	Object save(BatchLock o);
	/**
	 * 
	 * @param o
	 */
	boolean optimisticLock(BatchLock batchLock, String addr);
	
	boolean pessimisticLock(String code, String addr);
	
	boolean updateStatus(String code, short status);

}
